package com.fit.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.SessionState;

import com.fit.interfaces.BuldingMaterials;
import com.fit.interfaces.User;

public class BuldingMaterialsDetails {
	
	@Persist("flash")
	private BuldingMaterials chosenBuldingMaterials;

	public BuldingMaterials getChosenBuldingMaterials() {
		return chosenBuldingMaterials;
	}

	public void setChosenBuldingMaterials(BuldingMaterials chosenBuldingMaterials) {
		this.chosenBuldingMaterials = chosenBuldingMaterials;
	}
	@SessionState
	private User user;

	private boolean userExists;
	
	public User getUser() {
		return user;
	}
	
	Object onActivate() {
		if (!userExists) return Login.class;
		return null;
	}
	

}
